<template>
<div class="settledin container">
    <!-- 已入住企业 -->
    <p class="txt">已入驻企业</p>
    <ul class="settleLIst">
        <li v-for="(item,i) in settleData" :key="i">{{item.company}}</li>
    </ul>
 <Page :total="pageTotal"  :page-size="pagesize" @on-change="handlepage"/>
</div>
</template>

<script>
import homeService from '@/network/service/homeService.js'
export default {
    data() {
        return {
             settleData: [],
            // 分页、
            pageTotal:100, //总条数
            pagesize:7,   //每页条数
            page:0,
        }
    },
    mounted() {
        this.getCompanyList()
    },
    methods: {
        getCompanyList() {
            let params ={
                startTime:'',
                endTime:'',
            }
             homeService.getCompanyList(params,this.page,this.pagesize).then(res=>{
                 let result = res.data;
                //  console.log(result)
                 let code = result.rescode;
                 let resmsg = result.msg;
                 if(code == 100) {
                    //  console.log(result)
                     this.settleData = result.data
                     this.pageTotal = result.totalSize;
                 }else{
                     this.$Message.error(resmsg);
                 }
             },
             error=>{
                 this.$Message.error('服务器异常，请稍后再试')
             }
             )
        },
        handlepage(val) {
           this.page=val-1;
           this.getCompanyList()
        }
    },
}
</script>

<style lang="less" scoped>
.settledin {
    height: 100%;
    box-sizing: border-box;

    .txt {
        font-family: PingFangSC-Semibold;
        font-size: 30px;
        color: #FFFFFF;
        letter-spacing: -0.14px;
        text-align: center;
        padding: 46px 0px 60px;
    }

    .settleLIst {
        width: 630px;
        height: 154px;
        margin-left: 340px;

        li {
            width: 310px;
            line-height: 20px;
            float: left;
            font-family: PingFangSC-Regular;
            font-size: 16px;
            color: #FFFFFF;
            letter-spacing: -0.07px;
            line-height: 40px;
        }
    }

    .ivu-page {
        margin-top: 30px;
    }
}
</style>
